From: awilliam@xenbuild2.aw Date: Wed, 7 Feb 2007 17:14:41 +0000 (-0700) Subject: [IA64] Clean up error messages from lookup_domain_mpa() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15349 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=ac13f58c67efde3695d1f976536c9a13ccd56d1a;p=xen.git [IA64] Clean up error messages from lookup_domain_mpa() Guest I/O port accesses aren't very interesting, so reduce their log level Signed-off-by: Alex Williamson --- diff --git a/xen/arch/ia64/xen/mm.c b/xen/arch/ia64/xen/mm.c index 5cdb25c397..9b153b7f51 100644 --- a/xen/arch/ia64/xen/mm.c +++ b/xen/arch/ia64/xen/mm.c @@ -525,7 +525,9 @@ u64 translate_domain_pte(u64 pteval, u64 address, u64 itir__, u64* logps, This can happen when domU tries to touch i/o port space. Also prevents possible address aliasing issues. */ - printk("Warning: UC to WB for mpaddr=%lx\n", mpaddr); + if (!(mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE)) + gdprintk(XENLOG_WARNING, "Warning: UC to WB " + "for mpaddr=%lx\n", mpaddr); pteval = (pteval & ~_PAGE_MA_MASK) | _PAGE_MA_WB; } break; @@ -690,7 +692,6 @@ unsigned long lookup_domain_mpa(struct domain *d, unsigned long mpaddr, if (pte != NULL) { pte_t tmp_pte = *pte;// pte is volatile. copy the value. if (pte_present(tmp_pte)) { -//printk("lookup_domain_page: found mapping for %lx, pte=%lx\n",mpaddr,pte_val(*pte)); if (entry != NULL) p2m_entry_set(entry, pte, tmp_pte); return pte_val(tmp_pte); @@ -698,14 +699,20 @@ unsigned long lookup_domain_mpa(struct domain *d, unsigned long mpaddr, return GPFN_INV_MASK; } - printk("%s: d 0x%p id %d current 0x%p id %d\n", - __func__, d, d->domain_id, current, current->vcpu_id); - if (mpaddr < d->arch.convmem_end) - printk("%s: non-allocated mpa 0x%lx (< 0x%lx)\n", __func__, - mpaddr, d->arch.convmem_end); - else - printk("%s: bad mpa 0x%lx (=> 0x%lx)\n", __func__, - mpaddr, d->arch.convmem_end); + if (mpaddr < d->arch.convmem_end) { + gdprintk(XENLOG_WARNING, "vcpu %d iip 0x%016lx: non-allocated mpa " + "0x%lx (< 0x%lx)\n", current->vcpu_id, PSCB(current, iip), + mpaddr, d->arch.convmem_end); + } else if (mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE) { + /* Log I/O port probing, but complain less loudly about it */ + gdprintk(XENLOG_INFO, "vcpu %d iip 0x%016lx: bad I/O port access " + "0x%lx\n ", current->vcpu_id, PSCB(current, iip), + IO_SPACE_SPARSE_DECODING(mpaddr - IO_PORTS_PADDR)); + } else { + gdprintk(XENLOG_WARNING, "vcpu %d iip 0x%016lx: bad mpa 0x%lx " + "(=> 0x%lx)\n", current->vcpu_id, PSCB(current, iip), + mpaddr, d->arch.convmem_end); + } if (entry != NULL) p2m_entry_set(entry, NULL, __pte(0)); diff --git a/xen/include/asm-ia64/linux-xen/asm/io.h b/xen/include/asm-ia64/linux-xen/asm/io.h index 3ad22c0547..3182a944aa 100644 --- a/xen/include/asm-ia64/linux-xen/asm/io.h +++ b/xen/include/asm-ia64/linux-xen/asm/io.h @@ -49,7 +49,7 @@ #ifdef XEN /* Offset to IO port; do not catch error. */ -#define IO_SPACE_SPARSE_DECODING(off) ((((off) >> 12) << 2) | (off & 0x3)) +#define IO_SPACE_SPARSE_DECODING(off) ((((off) >> 12) << 2) | ((off) & 0x3)) #define IO_SPACE_SPARSE_PORTS_PER_PAGE (0x4 << (PAGE_SHIFT - 12)) #endif